package com.webchat.rmi.sso;


import com.webchat.common.bean.APIResponseBean;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.apache.el.parser.Token;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "webchat-sso-service",
        contextId = "oauthServiceClient",
        configuration = RpcRequestInterceptor.class)
public interface OauthServiceClient {

    @GetMapping("/sso-service/oauth/userId/{oauthCode}")
    APIResponseBean<String> getUserIdByOauthCode(@PathVariable String oauthCode);

    @GetMapping("/sso-service/token/userId/{token}")
    APIResponseBean<String> getUserIdByToken(@PathVariable String token);
}
